<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/31
 * Time: 14:32
 */

namespace app\admin\controller;
use think\Db;
use think\Controller;
class Api extends Controller
{
    /**
     * @param $date
     * 后台用户验证
     */
    public function checks(){
        $date=$_GET['date'];
        $result=Db::table('admin')->where("username='$date'")->find();
        if($result){
            echo true;
        }else{
            echo false ;
        }
    }
    public function goodsmsg($data){
         $result=Db::table("goodsmsg")->where("user_id='$data'")->select();
         if($result){
             return $result;
         }else{
             echo  false;
         }

    }
}